package com.southwind.springboottest.repository;

import com.southwind.springboottest.entity.Book;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface BookRepository extends JpaRepository<Book,Integer> {
    @Query("SELECT MAX(b.id) FROM Book b")
    Integer findMaxId();
    
    Page<Book> findByAbled(Integer abled, Pageable pageable);
}
